import React from "react";
import { Routes, Route, Navigate } from "react-router-dom";

import Index from "./pages/index.jsx";
import Detail from "./pages/detail.jsx";
import Catelist from "./pages/catelist.jsx";
import Discount from "./pages/discount";
import Login from "./pages/login.jsx";
import Register from "./pages/register.jsx";
import Order from "./pages/order.jsx";



function App() {
    return <Routes>
        <Route path="/index/*" element={<Index></Index>}></Route>
        <Route path="/detail" element={<Detail></Detail>}></Route>
        <Route path="/catelist" element={<Catelist></Catelist>}></Route>
        <Route path="/discount" element={<Discount></Discount>}></Route>
        <Route path="/login" element={<Login></Login>}></Route>
        <Route path="/register" element={<Register></Register>}></Route>
        <Route path="/order" element={<Order></Order>}></Route>

        <Route path="*" element={<Navigate to='/index'></Navigate>}></Route>
    </Routes>

}
export default App;